<?php
namespace Client\Table;

class RechargeCardTable extends CommonTable
{
    protected $table = 'hy_recharge_card';
    protected $id = 'rc_id';
        
    public function getUnusedByCode($code)
    {
        $resultSet = $this->select(array('has_use' => 0,'secret_code'=>$code));
        
        return $resultSet->current();
    }
}